<style>
.main_Receipt_table_m table td{
	text-align: left;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
	resource.validate();
	resource.gettreedata();
});
</script>
<form method="post" id="editresourceForm" >
	<div style="margin-top:10px;margin-left:2px;">
		<input type="hidden" name="resid" value="${resourceInfo.id!}" />
		<input id="parentId" value="${resourceInfo.parentId!}" type="hidden" name="resid" value="${resourceInfo.id!}" />
		<div  >
			<table class="table table-striped table-hover">
				<tbody>
				   <tr>
						<th style="width: 15%;line-height:32px;" scope="row"><@spring.message code='resource.name'/><span class="color_red">*</span></th>
						<td style="width: 85%;text-align:left;"><input id="input_name" class="edinputs" type="text" name="res" value="${resourceInfo.name!}" /></td>
					</tr>
					<tr>
						<th style="width: 15%;line-height:32px;" scope="row"><@spring.message code='resource.name_en'/><span class="color_red">*</span></th>
						<td style="width: 85%;text-align:left;"><input class="edinputs" id="input_nameEn" type="text" name="res" value="${resourceInfo.nameEn!}" /></td>
					</tr>
						<th style="width: 15%;line-height:32px;" scope="row"><@spring.message code='resource.code'/></th>
						<td style="width: 85%;text-align:left;"><input class="edinputs" type="text" name="res" value="${resourceInfo.code!}" /></td>
					</tr>
					<tr>
						<th style="width: 15%;line-height:32px;" scope="row"><@spring.message code='resource.description'/></th>
						<td style="width: 85%;text-align:left;"><input class="edinputs" type="text" name="res" value="${resourceInfo.description!}" /></td>
					</tr>
					<tr>
						<th style="width: 15%;line-height:32px;" scope="row"><@spring.message code='resource.sort'/><span class="color_red">*</span></th>
						<td style="width: 85%;text-align:left;"><input class="edinputs" id="input_sort" type="text" name="res" value="${resourceInfo.sort!}" placeholder="0-999之间的整数"/></td>
					</tr>
					<tr>
						<th style="width: 15%;line-height:32px;" scope="row"><@spring.message code='resource.match_sort'/><span class="color_red">*</span></th>
						<td style="width: 85%;text-align:left;"><input class="edinputs" id="input_match_Sort" type="text" name="res" value="${resourceInfo.matchSort!}" placeholder="0-99之间的整数"/></td>
					</tr>
					<tr>
						<th style="width: 15%;line-height:32px;" scope="row"><@spring.message code='resource.status'/><span class="color_red">*</span></th>
						<td style="width: 85%;text-align:left;">
							<input style="line-height:32px;" type="radio" name="statusSelect" value="0"  <#if resourceInfo.status == "0">checked="checked"</#if>>&nbsp;<@spring.message code='radio.invalid'/></input>
							&nbsp;&nbsp;&nbsp;
							<input style="line-height:32px;" type="radio" name="statusSelect" value="1"  <#if resourceInfo.status != "0">checked="checked"</#if>>&nbsp;<@spring.message code='radio.valid'/></input>
						</td>
					</tr>
					<tr>
						<th style="width: 15%;line-height:32px;" scope="row"><@spring.message code='resource.dangerLevel'/><span class="color_red">*</span></th>
						<td style="width: 85%;text-align:left;">
							<input style="line-height:32px;" type="radio" name="dangerLevelSelect" value="1"  <#if resourceInfo.dangerLevel == 1>checked="checked"</#if>>&nbsp;<@spring.message code='resource.low'/></input>
							&nbsp;&nbsp;&nbsp;
							<input style="line-height:32px;" type="radio" name="dangerLevelSelect" value="2"  <#if resourceInfo.dangerLevel == 2>checked="checked"</#if>>&nbsp;<@spring.message code='resource.middle'/></input>
							&nbsp;&nbsp;&nbsp;
							<input style="line-height:32px;" type="radio" name="dangerLevelSelect" value="3"  <#if resourceInfo.dangerLevel != 1 && resourceInfo.dangerLevel != 2>checked="checked"</#if>>&nbsp;<@spring.message code='resource.high'/></input>
						</td>
					</tr>
					
					<tr>
						<th style="width: 15%;line-height:32px;" scope="row"><@spring.message code='resource.parent'/></th>
						<td style="width: 85%;text-align:left;"><input class="form-control input-sm" style="width:300px;" id="tree" ></input></td>
					</tr>
					<tr>
						<th style="width: 15%;line-height:32px;" scope="row"><@spring.message code='resource.url'/></th>
						<td style="width: 85%;text-align:left;"><input class="edinputs" class="edinputs" type="text" name="res" value="${resourceInfo.url!}" /></td>
					</tr>
					<tr>
						<th style="width: 15%;line-height:32px;" scope="row"><@spring.message code='resource.match_url'/></th>
						<td style="width: 85%;text-align:left;"><input class="edinputs" type="text" name="res" value="${resourceInfo.matchUrl!}" /></td>
					</tr>
					<tr>
						<th style="width: 15%;line-height:32px;" scope="row"><@spring.message code='resource.icon'/></th>
						<td style="width: 85%;text-align:left;"><input class="edinputs" type="text" name="res" value="${resourceInfo.icon!}" /></td>
					</tr>
					<tr>
						<th style="width: 15%;line-height:32px;" scope="row"><@spring.message code='resource.opentarget'/><span class="color_red">*</span></th>
						<td style="width: 85%;text-align:left;">
							<select id="input_openTarget" name="res" class="form-control input-sm" style="width:300px;">
								<option value="0" ${(resourceInfo.openTarget==0)?string("selected","")}>当前窗口打开</option>
								<option value="1" ${(resourceInfo.openTarget==1)?string("selected","")}>打开新窗口</option>
							</select>
						</td>
					</tr>
					<tr>
						<th style="width: 15%;line-height:32px;" scope="row"><@spring.message code='resource.belong'/><span class="color_red">*</span></th>
						<td style="width: 85%;text-align:left;">
							<select id="input_belong" name="res" class="form-control input-sm" style="width:300px;" >
								<option value="000" ${(resourceInfo.belongTo=="000")?string("selected","")}>无</option>
								<option value="001" ${(resourceInfo.belongTo=="001")?string("selected","")}>块存储</option>
								<option value="010" ${(resourceInfo.belongTo=="010")?string("selected","")}>对象存储</option>
								<option value="111" ${(resourceInfo.belongTo=="111")?string("selected","")}>公共</option>
							</select>
						</td>
					</tr>									
				</tbody>
			</table>
		</div>
	</div>
</form>
<div style="margin-left: 25%;margin-bottom:10px;">
    <a id="save" class="btn btn-default" href="javascript:void(0);"
    		onclick="resource.save();"><@spring.message code='resource.save'/></a>
	&nbsp;&nbsp;
	<a id="cancel" class="btn btn-primary" href="javascript:void(0);"
    		onclick="resource.cancel();"><@spring.message code='resource.cancel'/></a>
</div>